﻿using System;

namespace cit.CopyDetection.Model
{
    public class TermWtFuncFactory
    {
        private static TermWtFuncFactory _instance;

        private TermWtFuncFactory() { }

        public static TermWtFuncFactory GetIntance()
        {
            if (_instance == null)
                _instance = new TermWtFuncFactory();

            return _instance;
        }

        public ILocalWtFunc CreateLocalWtFunc(string type)
        {
            return (ILocalWtFunc)Activator.CreateInstance(Type.GetType(type));
        }

        public IGlobalWtFunc CreateGlobalWtFunc(string type)
        {
            return (IGlobalWtFunc)Activator.CreateInstance(Type.GetType(type));
        }
    }
}
